Duplicate Code Detection using Control Statements
نویسنده
چکیده
Code clone detection is an important area of research as reusability is a key factor in software evolution. Duplicate code degrades the design and structure of software and software qualities like readability, changeability, maintainability. Code clone increases the maintenance cost as incorrect changes in copied code may lead to more errors. In this paper we address structural code similarity detection and propose new methods to detect structural clones using structure of control statements. By structure we mean order of control statements used in the source code. We have considered two orders of control structures: (i) Sequence of control statements as it appears (ii) Execution flow of control statements.
منابع مشابه
Developing a Novel and Effective Clone Detection Using Data Mining Technique
− A code clone is a code portion that is identical or similar to another in a source files. These code clones are called simple clones. And higher level similarities are called structural clones. Since several techniques have been proposed to detect this simple clone, still they occur in large software systems. This new algorithm detects the code clone for control structures such as for, while ...
متن کاملSource Code Retrieval Using Sequence Based Similarity
Duplicate code adversely affects the quality of software systems and hence should be detected. We discuss an approach that improves source code retrieval using structural information of source code. A lexical parser is developed to extract control statements and method identifiers from Java programs. We propose a similarity measure that is defined by the ratio of the number of sequential fully ...
متن کاملDuplicate code detection using anti-unification
This paper describes a new algorithm for finding software clones. It is conceptually independent of the source language of the analyzed programs, working at the level of abstract syntax trees. The algorithm considers that two sequences of statements form a clone if one of them can be obtained from the other by replacing some subtrees. To our knowledge this notion was not previously employed in ...
متن کاملImproving the Unification of Software Clones Using Tree and Graph Matching Algorithms
Improving the Unification of Software Clones using Tree and Graph Matching Algorithms Giri Panamoottil Krishnan Code duplication is common in all kind of software systems and is one of the most troublesome hurdles in software maintenance and evolution activities. Even though these code clones are created for the reuse of some functionality, they usually go through several modifications after th...
متن کاملProcedure Call Duplication: Minimization of Energy Consumption with Error Detection Latency Constraint
This paper presents a new software technique for detecting transient hardware errors. The objective is to guarantee data integrity in the presence of transient errors and to reduce energy consumption at the same time. Basically, we duplicate computations and compare their results to detect errors. There are three choices for duplicate computations: (1) duplicating every statement in the program...
متن کامل